<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>首页</title>
<link rel="stylesheet" type="text/css" href="{CSS_PATH2}reset-min.css">
<link rel="stylesheet" type="text/css" href="{CSS_PATH2}layout.css?ver={VERSION}">
<script type="text/javascript" src="{JS_PATH2}jquery-1.8.2.min.js"></script>
<!--[if lte ie 9]> 
<script src="{JS_PATH2}html5.js"></script>
<![endif]--> 
<!--[if lte IE 6]>
<script src="{JS_PATH2}png.js"></script>
  <script type="text/javascript">
    DD_belatedPNG.fix('div, ul, img, li, input , a , p , span');
  </script>
<![endif]-->

</head>
<body id="pc-bg">
	<div class="pc-header"><img src="{IMG_PATH2}icon/pc-title.png"></div>
	<div class="pc-main">		
		<!--1-->
		<div class="pc-title"><img src="{IMG_PATH2}icon/pc-t1.png"></div>
		<div class="pc-content" id="form2">
			<div class="pc-input clearfix">
				<label for="name">真实姓名</label>
				<input id="name" class="text" name="realname">
				<em class="wrongTips cuo">请填写正确格式！</em>
			</div>
			<div class="pc-input clearfix">
				<label for="name">手机号码</label>
				<input id="name" class="text" name="mobile">
				<em class="wrongTips cuo">请填写正确格式！</em>
			</div>
			<div class="pc-input clearfix">
				<label for="name">所在行业</label>
				<input id="name" class="text" name="trade">
				<em class="wrongTips cuo">请填写正确格式！</em>
			</div>
			<div class="pc-input clearfix">
				<label for="name">任职机构</label>
				<input id="name" class="text" name="goodjob">
				<em class="wrongTips cuo">请填写正确格式！</em>
			</div>
			<div class="pc-input clearfix">
				<label for="name">头衔职务</label>
				<input id="name" class="text" name="job">
				<em class="wrongTips cuo">请填写正确格式！</em>
			</div>
			<div class="pc-input clearfix">
				<label for="name">推荐人</label>
				<input id="name" class="text" name="tjr">
				<em class="wrongTips cuo">请填写正确格式！</em>
			</div>
		</div>
		<!--2-->
		<div class="pc-title"><img src="{IMG_PATH2}icon/pc-t2.png"></div>
		<div class="pc-content" id="form3">
			<div class="pc-input clearfix">
				<label for="name">擅长领域</label>
				<input id="s_contact" class="text ican" placeholder="例如论坛演讲、企业内训、房地产营销策划">
				<em class="wrongTips cuo">请填写信息！</em>
			</div>
			<div class="pc-input clearfix">
				<label for="name">我能解决</label>
				<input id="s_hangye" class="text ican" placeholder="例如实体零售店的场景体验营销策划">
				<em class="wrongTips cuo">请填写信息！</em>
			</div>
			<div class="pc-input clearfix">
				<label for="name">我能解决</label>
				<input id="s_hangye" class="text ican">
			</div>
			<div class="pc-input clearfix">
				<label for="name">个人资料</label>
				<textarea rows="5" name="content" id="con" onfocus="if(value=='例：策划总监，近10年的时间房地产营销，服务物业类型包括综合体、商业、住宅......'){value=''}" onblur="if (value ==''){value='例：策划总监，近10年的时间房地产营销，服务物业类型包括综合体、商业、住宅......'}">例：策划总监，近10年的时间房地产营销，服务物业类型包括综合体、商业、住宅......</textarea>
				<em class="wrongTips1 cuo">请填写个人资料！</em>
			</div>
			<div class="pc-input clearfix">
				<label for="name"> 上传照片</label>
				<iframe frameborder="no" id="actFrame" name="actFrame" scrolling="no" border="0" marginwidth="0" marginheight="0" style="display:none;"></iframe>
				<?php $url='http://'.$_SERVER['HTTP_HOST'];?> 
				<form action="{$url}/index.php?m=content&c=index&a=img" target="actFrame" id="imageform" enctype="multipart/form-data" method="post" >
				<div class="pc-photo">
		         	<div class="pc-s-photo">
		         		<div id="preview"><img src="/cdn/images/icon/pc-photo-bg.png" width="100%"></div>					
						<input type="file" class="fileImg" value="上传图片" name="userthumb" id="photoimg1">
						<input type="submit" class="btnSubmitSave" id="idsubmit1" name="dosubmit" value="上 传 图 片" readonly="readonly">
		         	</div>	
		        </div>	
				</form>
				<script type="text/javascript">
					function aaa(imgurl){
						$('#preview img').attr('src',imgurl);
					}
				</script>
			</div>
			
		</div>

		<!--3-->
		<div class="pc-title"><img src="{IMG_PATH2}icon/pc-t3.png"></div>
		<div class="pc-content">
			<div class="pc-input clearfix">
				<input type="radio" class="radio" alt="0">
				<label>电话咨询</label>
				<input class="text" name="s_tel">
				<i class="danwei">元 / 时</i>
				<em class="wrongTips cuo">请填写正确格式！</em>
			</div>
			<div class="pc-input clearfix">
				<input type="radio" class="radio" alt="1">
				<label>约见咨询</label>
				<i class="danwei">元 / 时</i>
				<input class="text" name="s_zixun">
				<em class="wrongTips cuo">请填写正确格式！</em>
			</div>
			<div class="pc-input clearfix">
				<input type="radio" class="radio" alt="2">
				<label>任务委托</label>
				<input class="text" placeholder="视情况定" readonly="readonly">
				<i class="danwei">元 / 时</i>
				<em class="wrongTips cuo">请填写正确格式！</em>
			</div>
		</div>
		<!--4-->
		<div class="pc-title"><img src="{IMG_PATH2}icon/pc-t4.png"></div>
		<div class="pc-content">
			<div class="pc-textarea">
				<textarea rows="5" name="content" class="needcon" id="con1" onfocus="if(value=='例如：微信公众号设计logo'){value=''}" onblur="if (value ==''){value='例如：微信公众号设计logo'}">例如：微信公众号设计logo</textarea>
			<em class="wrongTips1 cuo">请填写需求！</em>	

			</div>
					
		</div>
		<input type="submit" value="完 成" class="pc-submit" onclick="form5()">	 

		<div class="pc-tip-tel">如您有任何问题请联系高见学社客服人员协助您处理<br>
客服电话 : 400-021-0568</div>  

	</div>
<!--完成弹窗-->
<div class="winpop" style="display:none">
	<div class="winpop_con">
		<img src="{IMG_PATH2}icon/pc-get.png">
		<img src="{IMG_PATH2}icon/erweima.png">
	</div>
</div>




<script type="text/javascript">
	$(function(){
		$('.cuo').hide();
		//编辑头像
		$('#photoimg1').change(function(){
			$('#idsubmit1').trigger('click');
		});

		var imageOuter6542 = document.getElementById("preview");
		var imgs = imageOuter6542.getElementsByTagName("img");


		imgs[0] && imageOuter6542Coment(imgs[0]);


		for(var i=0;i<imgs.length;i++)
		{
			imgs[i].onload = function(){
				imageOuter6542Coment(this);
			};
		}
		function imageOuter6542Coment(img)
		{
			img.style.marginLeft = "0px";
			img.style.marginTop = "0px";
			img.style.width = "auto";
			img.style.height = "auto";

			var width = imageOuter6542.offsetWidth;
			var height = imageOuter6542.offsetHeight;

			if(img.src.search("sh_photo.png")>-1)
			{
				img.style.width = width+"px";
				img.style.height = height+"px";
				return;
			}

			if(img.width/width>img.height/height)
			{
				img.style.width = height/img.height*img.width+"px";
				img.style.height = height+"px";
				img.style.marginLeft = (width-img.width)/2+'px';
			}
			else
			{
				img.style.height = width/img.width*img.height + "px";
				img.style.width = width+"px";
				img.style.marginTop = (height-img.height)/2+'px';
			}
		}		

		

	});
	$('.radio').click(function(){
    	var n=$(this).index();
    	if($(this).hasClass('cur')){
    		$(this).attr('checked',false);
    		$(this).removeClass('cur');
    	}else{
    		$(this).attr('checked',true); 		
    		$(this).addClass('cur');
    	}
    	
    })
    $("input[name='s_tel']").keyup(function(){

    	$(this).parent().find('.radio').attr('checked',true); 
    	$(this).parent().find('.radio').addClass('cur');
    })
    $("input[name='s_zixun']").keyup(function(){
    	$(this).parent().find('.radio').attr('checked',true); 
    	$(this).parent().find('.radio').addClass('cur');
    })
    $('.winpop').click(function(){
    	//$(this).hide();
    	window.location.href=window.location.href;
    })
	function form5(){
    	var num=Number($('#hide').val());
    	var n=0;
    	var con= new Array();
    	$(".ican").each(function(){    		
    		con[n]=$(this).val();
    		n++;			
		});  

		
    	var str=''
		$(".cur").each(function(){				
			str+=$(this).attr('alt');
			str+=','	
		});
		
		var realname=$('#form2').find("input[name='realname']").val();
		var mobile=$('#form2').find("input[name='mobile']").val();
		var trade=$('#form2').find("input[name='trade']").val();
		var goodjob=$('#form2').find("input[name='goodjob']").val();
		var job=$('#form2').find("input[name='job']").val();
		var tjr=$('#form2').find("input[name='tjr']").val();

		if(str.indexOf(0)>=0)
		{
			var tel_rmb=$("input[name='s_tel']").val();
		}
		else
		{
		 	var tel_rmb=0;
		}
		if(str.indexOf(1)>=0)
		{
			var rmb=$("input[name='s_zixun']").val();
		}
		else
		{
		 	var rmb=0;
		}
		var content=$('#form3').find("textarea[name='content']").val();
		var con1=con[0];
		var con2=con[1];
		var con3=con[2];
    	var img=$('#preview img').attr('src');
    	var need=$('.needcon').val();
    	$.post("http://"+window.location.hostname+"/index.php?m=content&c=index&a=go_teachers_applys",{realname:realname,mobile:mobile,trade:trade,goodjob:goodjob,job:job,tjr:tjr,con1:con1,con2:con2,con3:con3,img:img,tel_rmb:tel_rmb,rmb:rmb,con:content,types:str,need:need},function(data){
    			if (data==100) {
					$(".winpop").show();					
					
    			}else{
    				$('.cuo').hide();
    				$('.cuo').eq(data).show();
    			}
	    		
		});
		
    }
</script>
</body>
</html>